<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<script type="text/javascript">
    function studentLogout() {
        if (confirm("您确定要退出系统吗？")) {
            window.location.href = "studentAction!logout";
        }
    }

    function managerLogout() {
        if (confirm("您确定要退出系统吗？")) {
            window.location.href = "managerAction!logout";
        }
    }
</script>
<div class="navbar">
    <div class="navbar-inner">
        <a class="brand" href="${pageContext.request.contextPath}/main.jsp">首页</a>
        <ul class="nav">
            <c:choose>
                <c:when test="${currentUser.flag==1 }">
                    <li><a href="${pageContext.request.contextPath}/studentAction!list">考生信息管理</a></li>
                    <li><a href="${pageContext.request.contextPath}/examAction!list">考生成绩查询</a></li>
                    <li><a href="${pageContext.request.contextPath}/paperAction!list">试卷管理</a></li>
                    <li><a href="${pageContext.request.contextPath}/questionAction!list">题目管理</a></li>
                    <li><a href="javascript:managerLogout()">退出系统</a></li>
                </c:when>
                <c:otherwise>
                    <li><a href="${pageContext.request.contextPath}/paperAction!list">在线考试</a></li>
                    <li><a href="${pageContext.request.contextPath}/examAction!list?exam.student.id=${currentUser.id}">成绩查询</a></li>
                    <li><a href="${pageContext.request.contextPath}/studentAction!preUpdatePassword">修改密码</a></li>
                    <li><a href="javascript:studentLogout()">退出系统</a></li>
                </c:otherwise>
            </c:choose>
        </ul>
    </div>
</div>